//
//  molde.m
//  SmileWeather
//
//  Created by lanou3g on 15/9/17.
//  Copyright (c) 2015年 陶天海. All rights reserved.
//

#import "molde.h"

@implementation molde

-(void)setValue:(id)value forUndefinedKey:(NSString *)key{

}
+(molde *)setMode:(NSDictionary*)diction{
    molde *mod = [[molde alloc] init];
    [mod setValuesForKeysWithDictionary:diction];
    return mod;
}
-(instancetype)initWithpm25:(NSString *)pm25 quality:(NSString *)qulity curPm:(NSString *)curPm dateTime:(NSString *)dateTime info:(NSDictionary *)info weather:(NSMutableArray *)weather{
    self = [super init];
    if (self) {
        self.pm25 = pm25;
        self.quality = qulity;
        self.curPm = curPm;
        self.dateTime = dateTime;
        self.info = info;
        self.weather = weather;
    }
    return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder{
    [aCoder encodeObject:self.pm25 forKey:@"pm25"];
    [aCoder encodeObject:self.quality forKey:@"qulity"];
    [aCoder encodeObject:self.curPm forKey:@"curPm"];
    [aCoder encodeObject:self.dateTime forKey:@"dateTime"];
    [aCoder encodeObject:self.info forKey:@"info"];
    [aCoder encodeObject:self.weather forKey:@"weather"];
    
}
- (id)initWithCoder:(NSCoder *)aDecoder{
    NSString *pm25 = [aDecoder decodeObjectForKey:@"pm25"];
    NSString *qulity = [aDecoder decodeObjectForKey:@"qulity"];
    NSString *curPm = [aDecoder decodeObjectForKey:@"curPm"];
    NSString *dateTime = [aDecoder decodeObjectForKey:@"dateTime"];
    NSDictionary *info = [aDecoder decodeObjectForKey:@"info"];
    NSMutableArray *weather = [aDecoder decodeObjectForKey:@"weather"];
    return [self initWithpm25:pm25 quality:qulity curPm:curPm dateTime:dateTime info:info weather:weather];
}

@end
